import Vue from 'vue';
import VueRouter from 'vue-router';
import Login from '../views/Login.vue';


// 1.安装路由
Vue.use(VueRouter);
// 2.配置路由
const routes = [
  
  {
    path: '/',
    name: 'Login',
    component:Login
  },
  {
    path: '/home',
    name: 'Home',
    component:()=>import('../views/Home.vue'),
  },
  {
    path: '/abort',
    name: 'Abort',
    component:()=>import('../views/Abort.vue'),
  },
    // 
];

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes,
});

// 3.暴露出去
export default router;
